<?php                          

    require_once("includes/common.inc.php");
    
    $page = Pages::CreatePage( $pageInfo->id );  

    $article = ArticleTable::GetItemBySlug( Request::GetParam('slug'), ArticleType::PRESS_RELEASE );
    if ( !$article || !$article->GetIsPublished() )
    {
        Util::RedirectToPage('Error404');
    }

    $page->SetDescription(strip_tags($article->GetExcerpt()));

    $page->SetArrVar('title', $article->GetTitle());
    $page->SetArrVar('content', $article->GetContent());
    
    $page->SetTitle( $article->GetMetaTitle() );
    $page->SetSubBreadcrumbsChain( Breadcrumbs::AddPageToChain( "PressReleases", $article->GetTitle() ) );

    $page->Display();
?>